package com.hopu.service.Impl;

import com.hopu.mapper.HouseMapper;
import com.hopu.pojo.Area;
import com.hopu.pojo.House;
import com.hopu.service.HouseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {
    @Resource
    private HouseMapper houseMapper;
    @Override
    public List<House> findAllHousePD(Integer hflag) {
        return houseMapper.findAllHousePD(hflag);
    }

    @Override
    public int addHouse(Integer sid, Integer aid, String haddress, String hfh, String hhx, String hmj, String hcx, float hmoney, float hwf, float hdx, float hsf, float hmq, float dkd, float skd, float mkd, String hjp, String hremark,String himg) {
        return houseMapper.addHouse(sid,aid,haddress,hfh,hhx,hmj,hcx,hmoney,hwf,hdx,hsf,hmq,dkd,skd,mkd,hjp,hremark,himg);
    }

    @Override
    public House findHouseById(Integer hid) {
        return houseMapper.findHouseById(hid);
    }

    @Override
    public int uppHouse(Integer hid,Integer sid, Integer aid, String haddress, String hfh, String hhx, String hmj, String hcx, float hmoney, float hwf, float hdx, float hsf, float hmq, float dkd, float skd, float mkd, String hjp, String hremark) {
        return houseMapper.uppHouse(hid,sid,aid,haddress,hfh,hhx,hmj,hcx,hmoney,hwf,hdx,hsf,hmq,dkd,skd,mkd,hjp,hremark);
    }

    @Override
    public int delHouse(int hid) {
        return houseMapper.delHouse(hid);
    }

    @Override
    public int huiFuHouse(int hid) {
        return houseMapper.huiFuHouse(hid);
    }

    @Override
    public List<House> findHouseByAid(Integer aid) {
        return houseMapper.findHouseByAid(aid);
    }

    @Override
    public List<House> findAllHouseByCondition(House house) {
        return houseMapper.findAllHouseByCondition(house);
    }

    @Override
    public List<House> findAllHouseByAidAndSid(House house) {
        return houseMapper.findAllHouseByAidAndSid(house);
    }
}
